package com.bwie.system.controller;

import com.bwie.common.domain.User;
import com.bwie.common.result.Result;
import com.bwie.system.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/User")
public class UserController {
    @Autowired
    private UserService userService;

    @PostMapping("/findByName/{userName}")
    public Result<User> findByName(@PathVariable String userName){
        Result<User> result=userService.findByName(userName);
        return result;
    }

}
